import { AsideList } from '../../constraint/index';

// 侧边栏
const Aside: AsideList = {
    AsideList: [
        { id: '1', title: '发现音乐', icon: "icon-yinle2", router: 'music'},
        { id: '2', title: '播客', icon: "icon-boke", router: 'podcast'},
        { id: '3', title: '视频', icon: "icon-shipin", router: 'video'},
        { id: '4', title: '动态', icon: "icon-dongtai", router: 'dynamic'},
        { id: '5', title: '私人FM', icon: "icon-leguansirendiantai" , router: 'radio'},
        { id: '6', title: '最近播放', icon: "icon-lishijilu", router: 'history'},
        { id: '7', title: '我的播客', icon: "icon-boke1", router: 'lovecollect'},
        { id: '8', title: '我的收藏', icon: "icon-shoucang1", router: 'collect'},
        { id: '9', title: '我喜欢的音乐', icon: "icon-shoucang", router: 'lovemusic'},
        { id: '10', title: '我的歌单', icon: "icon-gedan", router: 'songlist'},
    ],

}
const isCollapse = false
const title = '网易云音乐'


export default {
    namespaced: true,

    actions: {
        changeIsCollapse(mutations: any){
            console.log('表哥我来咯');
            mutations.commit('CHANGEISCOLLAPSE')
        }


    },
    mutations: {
        CHANGEISCOLLAPSE(state:any){
            state.isCollapse = !state.isCollapse
        }
    },
    getters: {

    },

    // 模块内容（module assets）
    state: () => ({
        // 侧边栏
        ...Aside,
        isCollapse,
        title,
    }), // 模块内的状态已经是嵌套的了，使用 `namespaced` 属性不会对其产生影响

}